fid = fopen('c:\manoj\ocean\x3dg\tsu_results\tsu10.res','rb')
fread(fid,518400,'uchar'); %Header includes the gird size, files used for computation etc
[Hpr1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Hpi1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Htr1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Hti1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Hrr1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Hri1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Epr1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Epi1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Etr1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Eti1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Err1] = reshape(fread(fid,360*180,'float32'),[180,360]);
[Eri1] = reshape(fread(fid,360*180,'float32'),[180,360]);
fclose(fid);



%---------------------------------------------------------------

File_1 = 'c:\manoj\ocean\x3dg\tsu_results\tsu10.res';

fid = fopen(File_1, 'r', 'n');

LBlock = fread(fid, 1, 'long');
NO = fread(fid, 1, 'long');
Period = fread(fid, 1, 'double'); 
np = fread(fid, 1, 'long');
nt = fread(fid, 1, 'long');
fseek(fid, LBlock, 'bof'); % LBlock if file is written on sun

Hpr = fread(fid, [nt np], 'float');
Hpi = fread(fid, [nt np], 'float');
Htr = fread(fid, [nt np], 'float');
Hti = fread(fid, [nt np], 'float');
Hrr = fread(fid, [nt np], 'float');
Hri = fread(fid, [nt np], 'float');

Epr = fread(fid, [nt np], 'float');
Epi = fread(fid, [nt np], 'float');
Etr = fread(fid, [nt np], 'float');
Eti = fread(fid, [nt np], 'float');

fclose(fid);
